package com.hnhegui.backend.payment.api;

import com.hnhegui.backend.entity.Result;
import com.hnhegui.backend.payment.dto.request.PaymentRequestDTO;
import com.hnhegui.backend.payment.dto.response.PaymentResponseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "hnhegui-backend-payment", path = "/api/payments", contextId = "paymentRestApi")
public interface PaymentRestApi {

    /**
     * 发起支付
     */
    @PostMapping("/pay")
    Result<PaymentResponseDTO> pay(@RequestBody PaymentRequestDTO request);
}
